<template>
  <div class="layout">
    <Layout style="background: rgb(231, 231, 241);">
      <Sider hide-trigger class="leftMenu" :class="projectName === 'qax' ? 'qax-leftMenu' : ''">
        <div class="logo-wrap" v-show="showMenuLogo">
          <img :src="iconLogo" alt="" @error="hideSysiconLogo()" style="display:none" />
          <img :src="sysTopLogo" alt="" @error="hideSysTopLogo()" v-if="showSysTopLogo" />
        </div>
        <div class="main-baseinfo" v-if="!showMenuLogo">
          <div class="avatar-name-wrap">
            <img
              id="globalAvatar"
              :src="setAvater"
              style="width:50px;height:50px;border-radius: 50%"
            />
            <p style="margin: 10px 0;text-align: center;overflow: hidden;">
              <span id="globalNickName" class="name">{{ nickname }}</span>
            </p>
          </div>
          <div class="notice-style">
            <Poptip
              placement="right"
              width="400"
              style="line-height: initial;z-index: initial"
              id="boardPoptip"
              v-model="visiblePop"
            >
              <span style="margin-left:30px;">
                <Badge :count="notReadCount" class="badge-wrap">
                  <Icon
                    type="ios-notifications-outline"
                    :size="18"
                    style="font-weight:bold"
                    color="rgb(91, 54, 194)"
                  />
                </Badge>
              </span>
              <div class="api" slot="content">
                <boardlist
                  type="list"
                  @hidePop="hidePop"
                  @showPop="showPop"
                  v-if="showNotice"
                ></boardlist>
              </div>
            </Poptip>
            <Poptip transfer confirm title="确定要退出此用户吗？" placement="left" @on-ok="Signout">
              <div class="signout-wrap">
                <img
                  src="../../assets/mainPage/signout.png"
                  style="vertical-align: middle;"
                  alt="退出"
                />
              </div>
            </Poptip>
          </div>
        </div>
        <SideMenuQax
          v-if="projectName == 'qax'"
          ref="sideMenu"
          :routeList="routeList"
          :activeNames="activeNames"
          @on-select="turnToPage"
          :height="setSiderHei"
        ></SideMenuQax>
        <side-menu
          v-else
          ref="sideMenu"
          :routeList="routeList"
          :activeNames="activeNames"
          @on-select="turnToPage"
          :height="setSiderHei"
        ></side-menu>
        <div class="side-bottom-img" v-if="projectName !== 'qax'">
          <img
            :src="sysLogo"
            alt=""
            @error="hideSysLogo()"
            :style="showSysLogo ? '' : 'visibility: hidden;'"
          />
          <div class="release">
            v1.1.01
          </div>
        </div>
      </Sider>
      <Layout class="left-lay-content">
        <Content class="desig-table-style">
          <router-view />
        </Content>
      </Layout>
    </Layout>
  </div>
</template>
<script>
import $ from 'jquery';
import cookieUse from '@/libs/cookie.js';
import encryption from '@/libs/encryption.js';
import { baseInfo, logout, getdatalist, getLogoImg, queryLogoImg } from '@/api/login.js';
import boardlist from '@/view/boardcast/boardcast';
import webScoket from '@/mixin/webScoket';
import baseURL from '@/api/index';
import { mapState, mapMutations } from 'vuex';
import SideMenu from '@/components/side-menu/menu.vue';
import SideMenuQax from '@/components/side-menu/menu-qax.vue';
// 用于控制裁判的哪些菜单可用于展示与跳转，保存的都是路由列表的key字段
const REFEREE_MENU_LIST = ['referee', 'baseInfo', 'bulletin', 'bulletinReceive'];

export default {
  components: { boardlist, SideMenu, SideMenuQax },
  mixins: [webScoket],
  data() {
    return {
      // 用户信息
      USER_ID: '',
      nickname: '',
      avatar: '',
      role: '',
      // route list
      routeList: [],
      // 当前路由所在位置
      activeNames: [], //一级,二级,三级
      showMenu: false,
      // 设置语言
      langFlag: false, // false为中文  true为英文
      lanText: '',
      showNotice: false,
      visiblePop: false,
      // 是否是裁判角色
      isReferee: false,
      setAvater: '',
      // 设置菜单栏高度
      setSiderHei: 'auto',
      //系统logo
      sysLogo: '',
      showSysLogo: true,
      sysTopLogo: '',
      iconLogo: '',
      showSysTopLogo: true,
      showMenuLogo: true,
      logoList: []
    };
  },
  computed: {
    ...mapState(['projectName']),
    ...mapState('board', ['notReadCount']) //未读消息数
  },
  async created() {
    // 从cookie中拿token
    // this.queryLogoImg()
    let getToken = cookieUse.getCookie('desig-token') || '';
    let getLang = cookieUse.getCookie('desig-lang') || 'zh';
    if (getToken === '') {
      // this.$router.push({
      //   path: '/login'
      // });
      window.openLogin(this.$router)
    } else {
      await this.getUserInfo().then();
      if (getLang === 'zh') {
        this.langFlag = true;
        this.lanText = 'EN';
      } else if (getLang === 'en') {
        this.langFlag = false;
        this.lanText = '中';
      }
      this.$i18n.locale = getLang;
      //配置的菜单路由列表
      let routeList = this.$router.options.routes[1].children;
      //渲染菜单栏(后台的菜单数据)
      getdatalist({ type: 'designer' }).then((res) => {
        if (res.data.code == 1) {
          let menulist = res.data.data;
          // let allMenuList = this.flatMenuList(menulist,Infinity);
          // 原接口 运维控制此字段，新接口返回直接展示，无hidden字段，扁平化处理后添加此字段保持页面逻辑，
          // menulist.forEach(item=>{
          //     this.$set(item,'hidden',true)
          // })
          let a = this.dealRoute(routeList, '', menulist); //控制菜单显示隐藏，和菜单名称
          this.$store.commit('user/setNewNameList', a.newNameList);
          this.routeList = a.newList;
        }
      });
      let name = this.$route.name;
      this.setULHei(name);
    }
  },
  mounted() {
    this.getLogo();
    // this.sysLogo = `${baseURL}/sdn/sys/menu/sysImage?sysType=2&label=1`
    // this.sysTopLogo = `${baseURL}/sdn/sys/menu/sysImage?sysType=2&label=4`
    // this.iconLogo = `${baseURL}/sdn/sys/menu/sysImage?sysType=2&label=2`
  },
  watch: {
    $route(to, from) {
      const { name, matched, meta } = to;
      this.activeNames = matched.map((item) => item.name).filter((item) => item !== 'main');
      this.setULHei(name);
    }
  },
  methods: {
    ...mapMutations('user', ['setUserInfo']),
    turnToPage(name) {
      if (this.isReferee && !REFEREE_MENU_LIST.includes(name)) {
        this.$router.push({
          path: '/referee'
        });
      } else {
        if (name == 'login') {
          cookieUse.setCookie('desig-token', '', 0);
          cookieUse.setCookie('Authorization', '', 0);
          sessionStorage.removeItem('November');
        }
        this.$router.push({
          path: '/' + name
        });
      }
    },
    // 菜单栏高度
    setULHei(name) {
      if (name === 'homer') {
        this.showMenuLogo = true;
        this.setSiderHei = 'calc(100% - 175px - 168px)';
      } else {
        this.showMenuLogo = false;
        this.setSiderHei = 'calc(100% - 175px - 181px)';
      }
    },
    // 处理一下是否显示裁判菜单
    handleRefereeMenu({ name, hidden }) {
      if (this.isReferee) {
        if (REFEREE_MENU_LIST.includes(name)) {
          return true;
        } else {
          return false;
        }
      } else {
        return hidden;
      }
    },
    // 15个   ''        数据返回的所有路由对象
    dealRoute(routeList, parentRoute, allMenuList) {
      const allNameList = [];
      function getRouterListName(list) {
        list.forEach((item) => {
          allNameList.push(item.name);
          if (item.children && item.children.length) {
            getRouterListName(item.children);
          }
        });
      }
      getRouterListName(routeList);

      function getItem(name, list) {
        let newObj = null;
        function getObjectByName(name, list) {
          for (let i = 0; i < list.length; i++) {
            const item = list[i];
            if (item.name == name) {
              newObj = item;
              return;
            }
            if (item.children && item.children.length) {
              getObjectByName(name, item.children);
            }
          }
        }
        getObjectByName(name, list);
        return newObj;
      }

      let newList = [];
      const newNameList = [];
      function getApiMeNuList(list, children) {
        list.forEach((item, index) => {
          newNameList.push(item.key);
          if (allNameList.includes(item.key)) {
            const newObj = {};
            newObj.name = getItem(item.key, routeList).name;
            newObj.meta = getItem(item.key, routeList).meta;
            newObj.path = getItem(item.key, routeList).path;
            newObj.title = getItem(item.key, routeList).title;
            newObj.redirect = getItem(item.key, routeList).redirect;
            newObj.hidden = true;
            if (children !== 0) {
              children.push(newObj);
            }
            if (item.children && item.children.length) {
              newObj.children = [];
              getApiMeNuList(item.children, newObj.children);
            }
            if (children === 0) {
              newList.push(newObj);
            }
          }
        });
      }
      getApiMeNuList(allMenuList, 0);
      return { newList, newNameList };

      // routeList.forEach(route => {
      // 	//根据名称获取路由对应的菜单配置信息
      // 	let menu = allMenuList.find(menu => menu.key == route.name);
      // 	if(menu){
      // 		let {name,hidden} = menu;
      // 		Object.assign(route,{'title':name,hidden});
      // 		if((parentRoute && parentRoute.hidden == false)){ //父菜单隐藏，子菜单都设为隐藏
      // 			route.hidden = false;
      // 		}
      // 		if(route.name == 'filing') { // 归档管理
      // 			this.setHasFile(route.hidden);
      // 		}
      // 		if(route.name == 'hwDrill') { //护网演练
      // 			sessionStorage.setItem('isRetainer', route.hidden)
      // 		}
      // 		if(route.children && route.children.length > 0) {
      // 			//子菜单没有或都隐藏，父菜单设为隐藏
      // 			if(!menu.children || menu.children.length == 0 || (menu.children && menu.children.every(menu => !menu.hidden))) {
      // 				route.hidden = false;
      // 			}
      // 			//处理子菜单
      // 			this.dealRoute(route.children,route,allMenuList);
      // 		}
      // 	}else{
      // 		if(route.name == 'referee') { // 裁判
      // 			route.title = '裁判审核';
      // 		} else if(route.name == 'filing') { // 归档管理
      // 			this.setHasFile(false);
      // 		} else if(route.name == 'hwDrill') { //护网演练
      // 			sessionStorage.setItem('isRetainer', false)
      // 		}
      // 		route.hidden = false
      // 	}
      // 	//裁判菜单处理
      // 	route.hidden = this.handleRefereeMenu(route);
      //     //新加任务管理子菜单，前端暂时先控制。
      //     if(route.name==='task'){
      //         route.hidden = true
      //     }
      // })
    },
    flatMenuList(arr, d = 1, result = []) {
      if (d > 0) {
        for (let item of arr) {
          if (item.children.length != 0) {
            result.push(item);
            this.flatMenuList(item.children, Infinity, result);
          } else {
            result.push(item);
          }
        }
        return result;
      } else {
        return arr.slice();
      }
    },
    // 获取用户信息
    getUserInfo() {
      return new Promise((resolve) => {
        let _this = this;
        _this.showNotice = false;
        baseInfo()
          .then((res) => {
            if (res.data.code === 1) {
              sessionStorage.removeItem('November');
              let userId = res.data.data.id;
              let nickname = res.data.data.nickname;
              let companyName = res.data.data.companyName;
              let companyId = res.data.data.companyId;
              let initPwd = res.data.data.initialPassword;
              this.setAvater = res.data.data.avatar || require('@/assets/globalIcon/defult.jpg');
              let userName = res.data.data.username;
              let type = res.data.data.type;
              let avatar = this.setAvater;
              // 单位管理员或者单位设计师
              let isRootDesigner;
              if (res.data.data.role && res.data.data.role === 'leader') {
                isRootDesigner = true;
              } else {
                isRootDesigner = false;
              }
              if (res.data.data.role === 'leader') {
                this.role = '单位管理员';
                this.isReferee = false;
              } else if (res.data.data.role === 'member') {
                this.role = '单位设计师';
                this.isReferee = false;
              } else if (res.data.data.role === 'evaluator') {
                this.role = '评估人员';
                this.isReferee = false;
              } else if (res.data.data.role === 'referee') {
                this.role = '裁判人员';
                this.isReferee = true;
              }
              let November = {
                userId: userId,
                userName: userName,
                nickname: nickname,
                companyName: companyName,
                companyId: companyId,
                initPwd: initPwd,
                avatar: avatar,
                isRootDesigner: isRootDesigner,
                isReferee: this.isReferee
              };
              this.setUserInfo(November);
              sessionStorage.setItem(
                'November',
                encryption.SelfUseEncrypt(JSON.stringify(November))
              );
              // 用户信息
              this.USER_ID = userId;
              this.nickname = nickname;
              this.showNotice = true;
              this.webSocketStatus();
              this.$Notice.destroy();
              if (initPwd) {
                this.$Notice.info({
                  title: '提示',
                  desc: '请修改初始化密码！',
                  duration: 0
                });
              }
            }
            resolve();
          })
          .catch((err) => {
            resolve();
          });
      });
    },
    // 退出登录
    Signout() {
      logout()
        .then((res) => {
          if (res.data.code === 1) {
            cookieUse.setCookie('desig-token', '', 0);
            cookieUse.setCookie('Authorization', '', 0);
            sessionStorage.removeItem('November');
            // this.$router.push({
            //   path: '/login'
            // });
            window.openLogin(this.$router)
          } else {
            this.$Message.error({
              content: res.data.message,
              duration: 2
            });
          }
        })
        .catch((err) => {
          this.$Message.error('服务器连接失败！');
        });
    },
    hidePop() {
      this.visiblePop = false;
    },
    showPop() {
      this.visiblePop = true;
    },
    hideSysLogo() {
      this.showSysLogo = false;
    },
    hideSysTopLogo() {
      this.showSysTopLogo = false;
    },
    hideSysiconLogo() {
      //删除标签缩略图
      // document.querySelector("link[rel='shortcut icon']").remove();
    },
    // 获取系统浏览器标签的图标
    getLogo() {
      let params = {
        systemType: 'designer'
      };
      getLogoImg(params)
        .then((res) => {
          if (res.data.code === 1) {
            let getData = res.data.data;
            // let bot = this.getBottom(getData, this.logoList, 'bottom')
            // let top = this.getBottom(getData, this.logoList, 'top')
            // let url = this.getBottom(getData, this.logoList, 'url')
            // let name = this.getName(getData, this.logoList, 'sysName')
            // this.sysLogo = bot // 底部
            // this.sysTopLogo = top // 菜单头部
            // this.iconLogo = url // ico 浏览器图标
            // if (bot) { // 如果返回了logo信息进行展示
            //     this.showSysLogo = true;
            // }
            // if (top) {
            //     this.showSysTopLogo = true;
            // }
            // if (url) {
            //     document.getElementById('favicon').setAttribute("href", url)
            // } else {
            //     document.getElementById('favicon').setAttribute("href", url + '?v=' + Math.random() * 100)
            // }

            // this.sysLogo = '/files' + getData[0].logo
            // this.sysTopLogo = '/files' + getData[1].logo
            // this.iconLogo = '/files' + getData[2].logo
            let top = getData.filter((item) => item.logoType == 'top');
            let bottom = getData.filter((item) => item.logoType == 'bottom');
            let url = getData.filter((item) => item.logoType == 'url');

            if (top && top.length > 0) {
              this.sysLogo = '/files' + top[0].logo;
              if (top[0].hidden == 'enable') {
                this.showSysTopLogo = true;
              }
            }
            if (bottom && bottom.length > 0) {
              this.sysTopLogo = '/files' + bottom[0].logo;
              if (bottom[0].hidden == 'enable') {
                // 如果返回了logo信息进行展示
                this.showSysLogo = true;
              }
            }

            if (url && url.length > 0) {
              this.iconLogo = '/files' + url[0].logo;
              if (url[0].hidden == 'enable') {
                document.getElementById('favicon').setAttribute('href', '/files' + getData[2].logo);
              } else {
                document
                  .getElementById('favicon')
                  .setAttribute('href', '/files' + getData[2].logo + '?v=' + Math.random() * 100);
              }
            }
          }
        })
        .catch((err) => {});
    },
    // 获取数据
    queryLogoImg() {
      queryLogoImg({ systemType: 'designer' })
        .then((res) => {
          if (res.data.code == 1) {
            this.logoList = res.data.data;
            console.log('queryLogoImg ~ this.logoList:', this.logoList);
          } else {
            console.log('获取数据失败');
          }
        })
        .catch((errer) => {
          console.log('获取数据失败');
        });
    },
    getBottom(data1, data2, type) {
      let img = '';
      if (data1.length > 0 || data2.length > 0) {
        let logoType1 = data1.filter((d) => d.logoType == type); // 运维设计
        let logoType2 = data2.filter((d) => d.logoType == type); // 单位设计
        if (logoType1.length > 0 && logoType2.length > 0) {
          if (logoType1[0].hidden == 'enable' && logoType2[0].hidden == 'enable') {
            img = '/files' + logoType2[0].logo;
          } else if (logoType1[0].hidden == 'enable' && logoType2[0].hidden == 'disable') {
            img = '/files' + logoType1[0].logo;
          } else if (logoType1[0].hidden == 'disable' && logoType2[0].hidden == 'enable') {
            img = '/files' + logoType2[0].logo;
          } else if (logoType1[0].hidden == 'enable') {
            img = '/files' + logoType1[0].logo;
          } else if (logoType2[0].hidden == 'enable') {
            img = '/files' + logoType2[0].logo;
          } else {
            img = '';
          }
        } else if (logoType1.length > 0 && logoType2.length == 0) {
          if (logoType1[0].hidden == 'enable') {
            img = '/files' + logoType1[0].logo;
          }
        } else if (logoType1.length == 0 && logoType2.length > 0) {
          if (logoType2[0].hidden == 'enable') {
            img = '/files' + logoType2[0].logo;
          }
        }
      } else {
        img = '';
      }
      return img;
    },
    getName(data1, data2, type) {
      let name = '';
      let logoType1 = data1.filter((d) => d.logoType == type); // 运维设计
      let logoType2 = data2.filter((d) => d.logoType == type); // 单位设计

      if (logoType1.length > 0 && logoType2.length > 0) {
        if (logoType1[0].hidden == 'enable' && logoType2[0].hidden == 'enable') {
          name = logoType2[0].sysName;
        } else if (logoType1[0].hidden == 'enable' && logoType2[0].hidden == 'disable') {
          name = logoType1[0].sysName;
        } else if (logoType1[0].hidden == 'disable' && logoType2[0].hidden == 'enable') {
          name = logoType2[0].sysName;
        } else if (logoType1[0].hidden == 'enable') {
          name = logoType1[0].sysName;
        } else if (logoType2[0].hidden == 'enable') {
          name = logoType2[0].sysName;
        } else {
          name = '';
        }
      } else if (logoType1.length > 0 && logoType2.length == 0) {
        if (logoType1[0].hidden == 'enable') {
          name = logoType1[0].sysName;
        } else {
          name = '';
        }
      } else if (logoType1.length == 0 && logoType2.length > 0) {
        if (logoType2[0].hidden == 'enable') {
          name = logoType2[0].sysName;
        } else {
          name = '';
        }
      } else {
        name = '';
      }
      return name;
    }
  }
};
</script>
<style scoped>
.layout {
  height: 100%;
  width: 100%;
}
.layout .ivu-layout {
  height: 100%;
}
.left-lay-content {
  overflow-x: hidden;
  overflow-y: auto;
}
.left-lay-content .desig-table-style {
  width: calc(100vw - 200px);
}
.left-lay-content::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 8px; /*高宽分别对应横竖滚动条的尺寸*/
  height: 4px;
}
.left-lay-content::-webkit-scrollbar-thumb {
  /*滚动条里面小方块样式*/
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: rgba(209, 209, 209, 0.6);
}
.left-lay-content::-webkit-scrollbar-track {
  /*滚动条里面轨道样式*/
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  background: rgba(179, 179, 179, 0.1);
}
.leftMenu {
  background-color: #ffffff;
  border-radius: 0 25px 25px 0;
  flex-direction: row;
}
.logo-wrap {
  width: 100%;
  height: 120px;
  margin: 25px 0;
  text-align: center;
}
.logo-wrap img {
  display: inline-block;
  width: 120px;
  height: 120px;
}
.bgMain {
  display: block !important;
}
.bgTask {
  display: block !important;
}
.bgStutdy {
  display: block !important;
}
.bgExam {
  display: block !important;
}
.bgLesson {
  display: block !important;
}
.bgCom {
  display: block !important;
}
.bgPer {
  display: block !important;
}
.signoutBtn {
  height: 26px;
  width: 60px;
  cursor: pointer;
  /*margin-right: 30px;*/
  line-height: 24px;
  text-align: center;
  border: 1px solid rgb(139, 139, 139);
  border-radius: 20px;
  color: rgb(139, 139, 139);
}
.signoutBtn:hover {
  color: rgb(47, 112, 255);
  border-color: rgb(47, 112, 255);
}
.logoutBtn {
  height: 26px;
  width: 82px;
  cursor: pointer;
  margin-right: 30px;
  line-height: 24px;
  text-align: center;
  border: 1px solid rgb(139, 139, 139);
  border-radius: 20px;
  color: rgb(139, 139, 139);
}
.logoutBtn:hover {
  color: rgb(47, 112, 255);
  border-color: rgb(47, 112, 255);
}
.changeLang {
  cursor: pointer;
  margin-right: 30px;
  height: 24px;
  width: 24px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid rgb(139, 139, 139);
  color: rgb(139, 139, 139);
  font-size: 14px;
}
.changeLang:hover {
  color: rgb(47, 112, 255);
  border-color: rgb(47, 112, 255);
}
.enLang {
  cursor: pointer;
  margin-right: 30px;
  height: 24px;
  width: 24px;
  line-height: 20px;
  text-align: center;
  border-radius: 50%;
  border: 1px solid rgb(139, 139, 139);
  color: rgb(139, 139, 139);
  font-size: 14px;
}
.enLang:hover {
  color: rgb(47, 112, 255);
  border-color: rgb(47, 112, 255);
}
.ulboard {
  max-height: 60vh;
  overflow-y: auto;
}
.ulboard::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 8px; /*高宽分别对应横竖滚动条的尺寸*/
  height: 4px;
}
.ulboard::-webkit-scrollbar-thumb {
  /*滚动条里面小方块样式*/
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  background: rgba(209, 209, 209, 0.6);
}
.ulboard::-webkit-scrollbar-track {
  /*滚动条里面轨道样式*/
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
  background: rgba(179, 179, 179, 0.1);
}
.ulboard li {
  border-bottom: 1px solid #e8eaec;
  padding: 12px 0;
  white-space: normal;
}
.side-bottom-img {
  width: 100%;
  height: 173px;
  background: url('../../assets/mainPage/side-bottom-img.png') no-repeat center center;
  background-size: 100% 100%;
  position: absolute;
  bottom: 0;
}
.side-bottom-img img {
  width: 175px;
  height: 48px;
  margin-top: 80px;
  margin-left: 10px;
}
.side-bottom-img .release {
  font-weight: bold;
  color: #fff;
  text-align: center;
}

.avatar-name-wrap {
  text-align: center;
}
.avatar-name-wrap .avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.avatar-name-wrap .name {
  display: inline-block;
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #8f90a6;
  font-size: 14px;
  font-weight: bold;
}
.signout-wrap,
.badge-wrap {
  line-height: initial;
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  background: rgb(239, 235, 249);
  border-radius: 50%;
  cursor: pointer;
}
.signout-wrap {
  margin-right: 20px;
}
.notice-style {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}
.main-baseinfo {
  background-color: #fff;
  margin: 25px 0;
}
/*qax*/
.qax-leftMenu {
  overflow: hidden;
}
.qax-leftMenu .main-baseinfo {
  background-color: #10182d;
}
.qax-leftMenu {
  background: #10182d;
  border-radius: 0;
}
/deep/.qax-leftMenu .ivu-layout-sider-children {
  display: flex;
  flex-direction: column;
}
</style>
<style>
#boardPoptip .ivu-poptip-body {
  padding: 0px;
}
.desig-table-style .ivu-table-wrapper {
  border-radius: 10px;
  border: none;
  box-shadow: 0 0 0 1px #ddd;
}
.desig-table-style thead tr th {
  background-color: #f5f8ff;
  border: none;
  color: #333;
  font-weight: bold;
}
.desig-table-style tbody tr:nth-child(even) td {
  background-color: #f5f8ff;
  border: none;
}
.desig-table-style tbody tr:nth-child(odd) td {
  background-color: #fff;
  border: none;
}
.desig-table-style .ivu-table {
  border-radius: 10px;
  color: #999;
}
.desig-table-style .ivu-table:before,
.desig-table-style .ivu-table:after {
  background-color: transparent;
}
.ivu-layout {
  background: #f4f7ff !important;
}
.notice-style .ivu-badge-count {
  height: 18px;
  line-height: 16px;
  font-size: 10px;
  padding: 0 3px;
}
.layout .ivu-tag {
  cursor: auto;
}
</style>
